package com.yanqu.road.server.cmd.cookboy.process2.cross;

import com.yanqu.road.pb.cookboy.CookBoyProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.manger.activity.cookboy.CookBoyMgr;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.Protocol;

import java.util.List;

@Cmd(code = Protocol.S_CROSS_COOK_BOY2_TO_COOK_BOY3, desc = "2进3")
public class CrossWindUpCmd extends AbstractCommand {

	//小当家2活动id
	private int activityId;
	//晋级的人
	private List<Long> userIdList;


	@Override
	public boolean parseData(YanQuMessage packet) throws Exception {
		return true;
	}

	@Override
	public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
		CookBoyProto.CrossCookBoyWindUpMsg crossSyncMsg = CookBoyProto.CrossCookBoyWindUpMsg.parseFrom(packet.getBytes());
		activityId = crossSyncMsg.getActivityId();
		userIdList = crossSyncMsg.getUserIdListList();
		CookBoyMgr.syncCookBoy2WindUp(activityId,userIdList);
	}

	@Override
	public void sendData(GamePlayer player) {

	}
}
